<?php
/**
 * @author hungnq@younetco.com
 */
class Core_Model_DbTable_Countries extends YouNet_Db_Table
{
	protected $_name		= 'countries';
	protected $_rowClass	= 'Core_Model_Country';
	
	private static $_instance;

	/**
	 * @author hungnq
	 * @return Core_Model_DbTable_Countries
	 */
	public static function getInstance()
	{
		if(is_null(self::$_instance))
		{
			self::$_instance = new self();
		}
		return self::$_instance;
	}
	
	public function getCountryList()
	{
		$data = array();
		$countries = $this->fetchAll(1);
		foreach($countries as $country)
		{
			$data[$country->id] = $country->country;
		}
		return $data;
	}
}
